<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft HTML Help Workshop 4.0">
<title>Example: Create an ALink using a text link</title>
<style>@import url(coUA.css);</style>
<link disabled rel="stylesheet" href="htmlhelp.css">
<script language="JavaScript" src="master.js"></script>
</head>

<body>
<h1>Example: Create an ALink using a text link
</h1>
<OBJECT id=hhctrl2 type="application/x-oleobject"
        classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"

>
    <PARAM name="Command" value="ALink">
    <PARAM name="Item1" value="">
    <PARAM name="Item2" value="example">
</OBJECT>

	<ol>
	<li>Click <A HREF="JavaScript:hhctrl2.Click()">here</A> to see a sample ALink text link. 
	<li>Open the HTML file in which you want to create an Associative link (ALink) as a text link.
<li>Click <a onclick="doSection(wiz)" class=sidebar href="#nowhere"><b>HTML Help ActiveX Control</b></a>.

	<DIV CLASS="sidebartext" ID="wiz" STYLE="display: none; height: 72px; width: 300px"
	onclick="noSection(wiz)">
<img src="sb_wiz.gif" width=64 height=64 border=0 alt="">
	<P class=margin>			
	<b>HTML Help ActiveX Control</b>
	</P>
	<P class=margin2>			
	Opens the HTML Help ActiveX Control Wizard, which enables you to insert or edit the control in an HTML file. 
	</P>
	</DIV>

	<li>In the <b>Specify the command</b> box, click <b>ALink Search</b> and, if you have already used the HTML Help ActiveX control in this file, enter an ID name for this instance of the control.
	<li>Click <b>Next</b>, and then click <b>Hidden</b> to specify that you will be scripting this use of the HTML Help ActiveX control. 
	<li>Select the appropriate display type options, and then add the ALink names you want to jump to.
	<li>Position the cursor at the location where you want to create the link, and then copy the following tag into your file:
	<br><br><code>&ltA  HREF="JavaScript:hhctrl2Click()"&gtadd link text here&lt/A&gt</code>
	<br><br>In this example, <code>hhctrl2</code> specifies 2 as the ID number for this instance of the HTML Help ActiveX control, which the <b>ALink Search</b> command should look for. 
	<li>Replace <code>add link text here</code> with the words you want to use.
	</li>
	</ol>

<h3>Notes</h3>

	<ul>
	<li>For this example, the ALink name <b>example</b> was added to the beginning of the HTML file.  When you click the text link, it jumps to all target files that contain <b>example</b> as an ALink name.
	<li>You can <a href="testkey.htm">test ALinks</a> in compiled help files.
	<li>For more information about ALinks, see the <a href="ms-its:hhaxref.chm::/ocx_alink.htm">HTML Help ActiveX control reference</a>.
	</li>
	</ul>
	
<table border="0" cellpadding="0" cellspacing="0">

<tr> <td valign="top"><a href="HTlink.htm"><img src="home.gif" alt="Home page link" border="0"></a>
</td><td><a href="HTlink.htm">About working with links</A>
</td></tr>
<tr><td>&nbsp;</td></tr>
</table>



</body>
</html>
